﻿package Classes {
	
	public class Table_Zobrist {
	    public var Player:ZobristStruct ;
    	public var Table:Array;
		
		public function Table_Zobrist() {
			Player = new ZobristStruct();
			Table = new Array();
			for (var i = 0; i < 24; i ++) {
				Table[i] = new Array();
        		for (var j = 0; j < 12; j ++) {
					Table[i][j] = new Array();
					for(var k=0;k<5;k++) {
						Table[i][j][k] = new ZobristStruct();
					}
				}
			}
		}
		// 初始化Zobrist表
		public function InitZobrist( )
		{
    		var i:int;
			var j:int;
			var k:int;
    		var rc4:RC4Struct = new RC4Struct();
    
    		rc4.InitZero();
    		Player.InitRC4(rc4);
    		for (i = 0; i < 24; i ++) {
        		for (j = 0; j < 12; j ++) {
					for(k=0;k<5;k++) {
            			var zobr:ZobristStruct = Table[i][j][k];
						zobr.InitRC4(rc4);
					}
        		}
    		}
		}

	}
	
}
